// src/router/index.js
import { createRouter, createWebHistory } from 'vue-router';
import HomeView from '../views/HomeView.vue';

const routes = [
    {
        path: '/',
        name: 'Home',
        component: HomeView
    },
    {
        path: '/ai-query',
        name: 'AIQuery',
        // 路由懒加载，访问该页面时才会加载对应的组件
        component: () => import('../views/AIQueryView.vue')
    },
    {
        path: '/code-runner',
        name: 'CodeRunner',
        component: () => import('../views/CodeRunnerView.vue')
    },
    {
        path: '/agent-task',
        name: 'AgentTask',
        component: () => import('../views/AgentTaskView.vue')
    },
    {
        path: '/web-clone1',
        name: 'WebClone1',
        component: () => import('../views/WebCloneView1.vue')
    },
    {
        path: '/web-clone2',
        name: 'WebClone2',
        component: () => import('../views/WebCloneView2.vue')
    },
    {
        path: '/mixed-zone',
        name: 'MixedZone',
        component: () => import('../views/MixedZoneView.vue')
    }
];

const router = createRouter({
    history: createWebHistory(),
    routes
});

export default router;